Skip to main content

XPDFViewer_Set

Type

command

Summary

Set a property of the PDF Viewer.

Syntax

XPDFViewer_Set <viewerName>, <property>, <value>

Description

Set the following properties:

  • rect - The rect of the PDF Viewer relative to the top left of the stack window.
  • fileName - The full file path to the PDF file being viewed
  • visible - The visibility of the PDF Viewer
  • pageNumber - The currently displayed page of the PDF Viewer document.
  • continuousScrollMode - The continuous scroll mode of the PDF document.
  • scroll - The current scroll of the displayed page as horizontal scroll, vertical scroll.
  • pageGravity - The gravity of the page when the view is larger than the scaled page in either width or height. Currently supported page gravities are:
   * topLeft (default) - top left of page sticks to the top left of the view
* center - the page is centered in the view
* hScrollbar - Boolean property to show or hide the horizontal scrollbar
* vScrollbar - Boolean property to show or hide the vertical scrollbar

The following errors may be thrown by the command:

  • XPDF_ERROR: incorrect number of parameters
  • XPDF_ERROR: can't set property
  • XPDF_ERROR: invalid rect
  • XPDF_ERROR: invalid scroll
  • XPDF_ERROR: could not open file
  • XPDF_ERROR: password required or incorrect password

Parameters

NameTypeDescription

viewerName

string

The name of the viewer.

property

string

The name of the property to set.

value

string

The value to set the property

Examples

XPDFViewer_Set "Document1", "rect", (100, 100, 500, 600)

Compatibility and Support

Introduced

LiveCode 1.0.0

OS

mac

windows

Platforms

desktop

Thank you for your feedback!

Was this page helpful?